Skip to content

Conversation

ryan-summers
Copy link
Member

@ryan-summers ryan-summers commented Jul 24, 2024

This PR refactors the network stack traits around DNS to change the implementation details.

The driving reason behind this is to align it more closely with std-based targets. Specifically, DNS implementation details are not exposed to the user, and if DNS services are not available, DNS resolution will Err.

This discussion came about as a result of quartiq/minimq#160, where we discussed the fact that there's two bounds required in our MQTT implementation.

I'm curious to hear feedback on this from other users of the DNS traits, CC @chrysn and @MathiasKoch

The intent here is to make DNS more of a "first class citizen" that is available for usage by all users. That way, client libraries that can take either an IP or a hostname can attempt resolution of the name and use the reuslt without requiring additional Dns trait bounds.


This is essentially solidifying some implementation details. For example, the smoltcp-nal already implements the Dns trait, but it only provides non-Err results if the user has set up the Smoltcp sockets with a DNS socket for processing. Thus, the trait bound isn't actually providing any value in protecting users from a missing DNS implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant